layui.use('layer', function () {
    var $ = layui.jquery,
            layer = layui.layer;
    function animateTo() {
        var classes = $('#animates').attr('class');
        $('#animates').attr('class', 'animate');
        var indicator = $('#animates');
        setTimeout(function () {
            $(indicator).addClass(classes)
        }, 300)
    }
    var timer = setInterval(animateTo, 2000)
})